export default function quickSort(array, begin, end) {
    if (begin >= end) return
    let l = begin, r = end
    let pivod = array[begin]
    while (l < r) {
        while (l < r && array[r] >= pivod) r--
        while (l < r && array[l] <= pivod) l++
        [array[r], array[l]] = [array[l], array[r]]
    }
    [array[begin], array[l]] = [array[l], array[begin]]
    quickSort(array, l + 1, end)
    quickSort(array, begin, l - 1)
    return array
}